/**
 * Created by 李一方 on 2015/3/3.
 */
var pMenu;

pMenu = new dijit.Menu({
    targetNodeIds: ["prog_menu"]
});

pMenu.addChild(new dijit.MenuItem({
    label: "菜单项-1",
    onClick: function () {
        alert('我是第一个菜单')
    }
}));

pMenu.addChild(new dijit.MenuItem({
    label: "菜单项-2",
    onClick: function () {
        alert('我是第二个菜单')
    }
}));

pMenu.addChild(new dijit.MenuSeparator());

var pSubMenu = new dijit.Menu();

pSubMenu.addChild(new dijit.MenuItem({
    lable: "子菜单项1"
}));

pSubMenu.addChild(new dijit.MenuItem({
    lable: "子菜单项2"
}));

pMenu.addChild(new dijit.PopupMenuItem({
    lable: "启用子菜单",
    popup: pSubMenus
}));

pMenu.startup();
